﻿using System;
using System.Collections.Generic;
using SqlSugar;
using XiheNet.Data;

// * * * * * * * * * * * * * * *
// * company: xihekeji.com     *
// * date: 2024-11-23          *
// * author: skirtboy@qq.com   *
// * * * * * * * * * * * * * * *

namespace Com.Entity
{
    [SugarTable("T_BookActivate", TableDescription = "图书激活")]
    public class TBookActivateEntity:DeltEntity
    {
        public int UserId { get; set; }                     // 用户编号
        public int BookId { get; set; }                     // 图书编号
        public int CreateUserID { get; set; }               // 创建人
        public int DeltUserID { get; set; }                 // 删除人



        #region 时间格式化
        [SugarColumn(IsIgnore = true)]
        public string CreateTimeDT { get => CreateTime.ToString("yyyy-MM-dd HH:mm:ss"); }

        [SugarColumn(IsIgnore = true)]
        public string DeltTimeDT { get => DeltTime.ToString("yyyy-MM-dd HH:mm:ss"); }
        #endregion



        #region 联表
        // 图书
        [Navigate(NavigateType.OneToOne, nameof(BookId))]
        public TBookEntity Book { get; set; }

        // 使用人
        [Navigate(NavigateType.OneToOne, nameof(UserId))]
        public TUserEntity User { get; set; }
        #endregion

    }
}